package ${packagePath}${entityPackage};

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.spa.common.utils.LongToStringUtil;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * ${introduce}
 * author: ${author}
 * date: ${date}
 */
@ApiModel(description = "${introduce}")
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("${tableInfo.name}")
public class ${entity} extends BaseEntity {

    private static final long serialVersionUID = 1L;
    
    /**
    * 构造函数
    */
    public ${entity}() {version = Long.valueOf(1);}

<#-- 循环属性名称 -->
<#list tableInfo.fields as field>
    /**
     * ${field.comment}
     */
    @ApiModelProperty("${field.comment}")
<#if field.propertyName == "Uuid">
    @TableId(value = "Uuid", type = IdType.ASSIGN_ID)
<#elseif field.propertyName?length gt 5 && field.propertyName?substring(0,6) == "Create">
    @TableField(value = "${field.propertyName}", fill = FieldFill.INSERT)
<#elseif field.propertyName?length gt 5 && field.propertyName?substring(0,6) == "Modify">
    @TableField(value = "${field.propertyName}", fill = FieldFill.UPDATE)
<#else>
    @TableField(value="${field.propertyName}")
</#if>
<#--<#if field.type??>-->
<#--    @Length(max = ${field.propertyLength})-->
<#--</#if>-->
    private ${field.propertyType} ${field.propertyName?uncap_first};
</#list>
}
